'use strict';
exports.main = (event, context) => {
	//event为客户端上传的参数
	const db = uniCloud.database();
	const delImg = db.collection('opendb-news-favorite').where({
		user: event.user,
		url: event.url
	}).remove().then(res => {
		console.log('删除成功', res);
	}).catch(err => {
		console.log('删除失败', err);
	});
	//返回数据给客户端
	return delImg
};
